<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$title}</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />
<link rel="stylesheet" href="{MODULE_URL}public/mobile/css/weixin.css">
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/wxIndexnew.css?v=4.920329" />
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=4.920120" />
{php echo register_jssdk();}
<script src="{MODULE_URL}public/mobile/js/jquery.js"></script>
<script type="text/javascript" src="{OSSURL}public/mobile/js/swipe.js"></script>
<script src="{OSSURL}public/mobile/js/banner.js"></script>
</head>
<body>
<style type="text/css">
.box_swipe {overflow: hidden;position: relative;}
.box_swipe ul {overflow: hidden;position: relative;}
.box_swipe ul > li {float:left;width:100%;position: relative;}
.box_swipe ul > li a{color:#FFF;text-decoration:none;}
.box_swipe ul > li .title{position: absolute;bottom:6px;display: block;width: 70%;height:20px;padding:0 10px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;z-index:100;font-size: 16px;line-height: 20px;}
.box_swipe>ol{height:20px;position: relative;z-index:10;margin-top:-25px;text-align:right;padding-right:15px;background-color:rgba(0,0,0,0.3);}
.box_swipe>ol>li{display:inline-block;margin-bottom:1px;width:8px;height:8px;background-color:#757575;border-radius: 8px;}
.box_swipe>ol>li.on{background-color:#ffffff;}
.topannounce {background:#000;color: #fff;background-size: 100%;z-index: 9999999;}	 
#speaker {width: 100%;height: 30px;line-height: 30px;position: fixed;z-index: 980;background-color: #189458;opacity: 0.95; overflow: hidden;box-shadow: 0px 0px 2px #222;-webkit-box-shadow: 0px 0px 2px #222;}
#s-word {font-size: 16px;width: 82%;height: 30px;left: 20px;}
#s-word a {color:#fff;text-decoration: none;  margin-right: 60px;}
</style>
{if !empty($item['gonggao'])} 	
	<div id="topannounce" class="topannounce">
		<div id="speaker">
			<span id="s-word">
				<marquee behavior="scroll" scrollamount="4" direction="left" width="100%">
					<a>
						{$item['gonggao']}       
					</a>
				</marquee>
			</span>
		</div>		
	</div>	
	<script type="text/javascript">
        $('#s-fork').click(function(){
            $('#topannounce').hide();
              //$("#players").css("top",0);
             // $(".mui-global-m-smart-banner").css("top",0);
        });
	</script>	
{/if}
<div class="all">
{if !empty($banners)}
<div class="showPic">
  <div id="banner_box" class="box_swipe" style="  max-width: 640px;  margin: 0 auto;  margin-bottom: 0px;">
      <ul id="bheight">
          {loop $barr $mid $banner}
            <li>
                <a href="{if empty($banner['link'])}#{else}{$banner['link']}{/if}"><img src="{php echo toimage($banner['thumb'])}" alt="{$banner['bannername']}"  width='100%' style="max-height:600px;" />
                </a>
                <span class="title" style="color:#fff;">{$banner['bannername']}</span>
            </li>
          {/loop}
      </ul>
      <ol>
        {loop $barr $slideNum $banner}
          <li{if $slideNum == 0} class="on"{/if}></li>
        {/loop}
      </ol>
  </div>
</div>
  {/if}
<div class="btnList" style="border-bottom:none;">
	<ul>
		<li style="float: center; display: block; align: 25%;">
		{loop $icon1 $item}
			<div class="btnDiv">
				<a href="{$item['url']}">
					<div class="ico">
						<img alt src="{php echo tomedia($item['icon'])}" style="-webkit-touch-callout: none; -webkit-user-select: none;">	
					</div>
					<span>{$item['name']}</span>
				</a>
			</div>
		{/loop}	
		</li>
	</ul>
</div>
{if !empty($icon2)}
<div class="btnList" style="border-bottom:none;">
	<ul>
		<li style="float: center; display: block; align: 25%;">
		{loop $icon2 $item}
			<div class="btnDiv">
				<a href="{$item['url']}">
					<div class="ico">
						<img alt src="{php echo tomedia($item['icon'])}" style="-webkit-touch-callout: none; -webkit-user-select: none;">	
					</div>
					<span>{$item['name']}</span>
				</a>
			</div>
		{/loop}	
		</li>
	</ul>
</div>
{/if}
<div class="line"></div>
{if $list1}
<div class="newsList">
	<div class="top">
		<div class="title">校园公告</div>
		<div class="more">
			<a href="{php echo $this->createMobileUrl('newslist', array('op' => 'article', 'schoolid' => $schoolid), true)}">更多</a>			
		</div>
	</div>
	<ul>
	{loop $list1 $item1}
		<a href="{php echo $this->createMobileUrl('new', array('schoolid' => $schoolid, 'id' => $item1['id']), true)}">
			<li>
				<div class="img">
					<img alt src="{php echo tomedia($item1['thumb']);}" style="top: 0px; left: 0px; height: 100%; width: 100%; -webkit-touch-callout: none; -webkit-user-select: none;">
				</div>
				<div class="content">
					<div class="t">{$item1['title']}</div>
					<div class="b"  style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:200px;">{$item1['description']}</div>
					<div class="time">{php echo date('m-d', $item1['createtime'])}</div>
				</div>
			</li>
		</a>
	{/loop}	
	</ul>
</div>
<div class="line"></div>
{/if}
{if $list2}
<div class="newsList">
	<div class="top">
		<div class="title">校园新闻</div>
		<div class="more">
			<a href="{php echo $this->createMobileUrl('newslist', array('op' => 'news', 'schoolid' => $schoolid), true)}">更多</a>	
		</div>
	</div>
	<ul>
	{loop $list2 $item1}
		<a href="{php echo $this->createMobileUrl('new', array('schoolid' => $schoolid, 'id' => $item1['id']), true)}">
			<li>
				<div class="img">
					<img alt src="{php echo tomedia($item1['thumb']);}" style="top: 0px; left: 0px; height: 100%; width: 100%; -webkit-touch-callout: none; -webkit-user-select: none;">
				</div>
				<div class="content">
					<div class="t">{$item1['title']}</div>
					<div class="b"  style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:200px;">{$item1['description']}</div>
					<div class="time">{php echo date('m-d', $item1['createtime'])}</div>
				</div>
			</li>
		</a>
	{/loop}			
	</ul>
</div>
<div class="line"></div>
{/if}
{if $list3}
<div class="newsList">
	<div class="top">
		<div class="title">精美文选</div>
		<div class="more">
			<a href="{php echo $this->createMobileUrl('newslist', array('op' => 'wenzhang', 'schoolid' => $schoolid), true)}">更多</a>			
		</div>
	</div>
	<ul>
	{loop $list3 $item1}
		<a href="{php echo $this->createMobileUrl('new', array('schoolid' => $schoolid, 'id' => $item1['id']), true)}">
			<li>
				<div class="img">
					<img alt src="{php echo tomedia($item1['thumb']);}" style="top: 0px; left: 0px; height: 100%; width: 100%; -webkit-touch-callout: none; -webkit-user-select: none;">
				</div>
				<div class="content">
					<div class="t">{$item1['title']}</div>
					<div class="b"  style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:200px;">{$item1['description']}</div>
					<div class="time">{php echo date('m-d', $item1['createtime'])}</div>
				</div>
			</li>
		</a>
	{/loop}		
	</ul>
</div>
{/if}
<div class="line" style="padding-bottom:65px;"></div>
</div>
   {php include $this->template('footer');} 
</body>
<script type="text/javascript">
wx.ready(function () {
	sharedata = {
		title: '{$item['title']}',
		desc: '{$item['info']}',
		link: '{$links}',
		imgUrl: '{php echo tomedia($item['thumb'])}',
		success: function(){
			
		},
		cancel: function(){
			
		}
	};
	sharedata1 = {
		title: '{$item['info']}',
		desc: '{$item['title']}',
		link: '{$links}',
		imgUrl: '{php echo tomedia($item['thumb'])}',
		success: function(){
			
		},
		cancel: function(){
			
		}
	};	
	wx.onMenuShareAppMessage(sharedata);
	wx.onMenuShareTimeline(sharedata1);
});
$(function() {

	WeixinJSShowShareMenu();

    WeixinJSShowProfileMenuAndShare();
		
});

function WeixinJSShowShareMenu(){
	if (typeof wx != "undefined"){
		wx.ready(function () {
			wx.showMenuItems({
			    menuList: ['menuItem:share:appMessage','menuItem:share:timeline'] // 要显示的菜单项，所有menu项见附录3
			});
		});
	}
}	


function WeixinJSShowProfileMenuAndShare(){
	
	if (typeof wx != "undefined"){
		wx.ready(function () {
			wx.showMenuItems({
			    menuList: ['menuItem:share:appMessage','menuItem:share:timeline','menuItem:profile','menuItem:addContact','menuItem:favorite'] // 要显示的菜单项，所有menu项见附录3
			});
		});
	}
}
</script>	
</html>